package com.training.java.module2;

import java.util.ArrayList;
import java.util.List;


public class History {
    private int complitedActionId;

    private List<UserAction> listOfUserActions;

    public History(){
        complitedActionId = 0;
        listOfUserActions = new ArrayList<UserAction>();
    }

    public void addUserAction(UserAction actionOfUser){
        listOfUserActions.add(actionOfUser);
    }
    public void getUserAction(){
        listOfUserActions.get(complitedActionId).userAction();
        complitedActionId++;
    }
    public int getHistorySize(){
        return listOfUserActions.size();
    }
}
